package main.ykt;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Entity
@Table(name = "yktcountrymajorinfo")
@Getter
@Setter
public class YktCountryMajorInfo {
    @NotNull
    @Column(columnDefinition = "varchar(30) not null")
    private String code;
    @Column(columnDefinition = "smallint unsigned default '0' comment '默认值为0'")
    protected Integer parentid;
    @Column(columnDefinition = "smallint not null")
    protected Integer thelevel;
    @Column(columnDefinition = "smallint  not null")
    protected Integer theorder;
    @Column(columnDefinition = " bit(1) not null default b'0' comment '是否叶子节点'")
    protected Boolean isleaf;
    @Column(columnDefinition = "smallint  not null")
    protected Integer childnum;
    @NotNull
    @Column(columnDefinition = "varchar(80) binary not null default '名称'")
    protected String name;
    @Column(columnDefinition = "varchar(255) binary default '' comment '备注'")
    protected String remark;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(columnDefinition = "smallint unsigned comment '编号'")
    protected Integer id;
    @Column(columnDefinition = "datetime not null comment '创建时间'",updatable = false)
    protected Date createtime;
    @Column(columnDefinition = "datetime not null comment '更新时间'")
    protected Date updatetime;
    @Column(nullable = false,columnDefinition = " bit(1) default b'0' comment '删除标记'")
    protected Boolean isdeleted;

}
